package cn.wei.sdd.core.service;

import cn.wei.sdd.core.pojo.entity.Orders;
import cn.wei.sdd.core.pojo.query.OrdersQuery;
import cn.wei.sdd.core.pojo.vo.ConfirmOrdersVO;
import cn.wei.sdd.core.pojo.vo.OrderStatisticsVO;
import cn.wei.sdd.core.pojo.vo.PlaceOrdersVO;
import cn.wei.sdd.core.pojo.vo.UserOrdersVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 回收订单表 服务类
 * </p>
 *
 * @author Wei
 * @since 2021-10-25
 */
public interface OrderService extends IService<Orders> {

    void reservationOrder(PlaceOrdersVO placeOrdersVO, Long userId);

    List<UserOrdersVO> getOrdersByUserId(Long userId, Integer status);

    List<UserOrdersVO> getWaitOrders();

    List<UserOrdersVO> getOrdersByRecyclerId(Long recyclerId,Long recyclerStatus);

    void grabOrder(String orderNo, Long recyclerId, String recyclerName);

    void confirmOrders(ConfirmOrdersVO confirmOrdersVO, Long userId);

    BigDecimal getTotalPriceByOrdersId(Long id);


    IPage<Orders> listPage(Page<Orders> pageParam, OrdersQuery ordersQuery);

    List<OrderStatisticsVO> getOrderStatisticsByDate(String recentTime);

    List<OrderStatisticsVO> getRecyclerStatisticsByDate(String recentTime);

    Orders getOrderByOrderNo(String orderNo);

    int selectOrderStatusByOrderNo(Long userId, String orderNo);

    void OrderCancelByOrderNo(String orderNo);
}
